<?php echo $this->Session->flash(); ?>
<div  id="loadac" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>
<h1>108. ACTIVIDAD AGRICOLA</h1>
<fieldset>
   
    <table border="1">
        <thead>

            <tr>
                <td>TIPO</td>
                <td>TIPO OTRO</td>
                <td>ÁREA CULTIVADA</td>
                <td>VARIEDAD</td>
                <td>ESTADO CULTIVO</td>
                <td>RENDIMIENTO</td>
                <td>FECHA DE SIEMBRA</td>
                <td>SITIO DE VENTA</td>
                <td>A QUIÉN VENDE</td>
                <td>ÁREA A EXPLOTAR</td>
                <td colspan="2"></td>
            </tr>

        </thead>
        <tbody>
            <?php foreach ($activities as $ac): ?>

                <tr>
                    <td><?php echo $ac['AgriculturalActivity']['tipo']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['tipo_otro']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['area_cultivada']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['variedad']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['estado_cultivo']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['rendimiento']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['fecha_de_siembra']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['sitio_de_venta']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['a_quien_vende']; ?></td>
                    <td><?php echo $ac['AgriculturalActivity']['area_a_explotar']; ?></td>
                    <td><?php 
                    if ($usuario['User']['group_id'] != 5 && $usuario['User']['group_id'] != 6 && $visto_bueno['Poll']['visto_bueno'] != 'Si') {
                        echo $ajax->link("Editar", array('controller' => 'AgriculturalActivities', "action" => "edit", $ac['AgriculturalActivity']['id']), array('update' => 'agr_activities', 'indicator' => 'loadac'));
                    }
                     ?></td>
                    <td><?php 
                    if ($usuario['User']['group_id'] != 5 && $usuario['User']['group_id'] != 6 && $visto_bueno['Poll']['visto_bueno'] != 'Si') {
                        echo $ajax->link("Eliminar", array('controller' => 'AgriculturalActivities', "action" => "delete", $ac['AgriculturalActivity']['id'],$this->data['AgriculturalActivity']['poll_id']), array('update' => 'agr_activities', 'indicator' => 'loadac'),'¿Desea Eliminar El Registro?');
                    }
                     ?></td>
              
                </tr>

            <?php endforeach; ?>
        </tbody>
    </table>
    <?php 
    if ($usuario['User']['group_id'] != 5 && $usuario['User']['group_id'] != 6  && $visto_bueno['Poll']['visto_bueno'] != 'Si') {
        echo $ajax->link("Adicionar", array('controller' => 'AgriculturalActivities', "action" => "add", $this->data['AgriculturalActivity']['poll_id']), array('update' => 'agr_activities', 'indicator' => 'loadac'));
    }
     ?>
</fieldset>
